#region "IfElse"

/*
 * ####     Developer Name : Wang Yucai
 * 
 * ####     Development Tool : Microsoft VisualStudio 2010 Ultimate Edition
 * 
 * ####     Create Time : 2014/7/8 11:35:53
 * 
 * ####     Namespace : Masterduner.SourceStudio.Practices.DevelopmentLibrary
 * 
 * ####     Type Name : IfElse
 * 
 * ####     Full Name : Masterduner.SourceStudio.Practices.DevelopmentLibrary.IfElse
 * 
 * ####     Machine Name : GLCHQWYCWINW7
 * 
 * ####     UserName : GUOCOLAND/wangyucai
 * 
 * ####     CLR Version : 4.0.30319.18408
 * 
 * ####     Target Framework Version : 4.0
 */

#endregion


namespace Masterduner.SourceStudio.Practices.DevelopmentLibrary
{
    /// <summary>
    /// <para>Masterduner.SourceStudio.Practices.DevelopmentLibrary.IfElse</para>
    /// <para>
    /// 用于处理If-Else语句。
    /// </para>
    /// </summary>
    /// <remarks>
    /// <para>Target Framework Version : 4.0</para>
    /// </remarks>
    public static class IfElse
    {
        #region Do
        /// <summary>
        /// 执行只含有If语句的判断表达式。
        /// </summary>
        /// <param name="expression">验证条件表达式。</param>
        /// <param name="trueExpr"><see cref="TrueExpression"/></param>
        /// <param name="arguments">附加参数。</param>
        static public void Do(bool expression, TrueExpression trueExpr, params object[] arguments)
        {
            if (expression) trueExpr(arguments);
        }

        /// <summary>
        /// 执行含有If-Else语句的判断表达式。
        /// </summary>
        /// <param name="expression">验证条件表达式。</param>
        /// <param name="trueExpr"><see cref="TrueExpression"/>。</param>
        /// <param name="falseExpr"><see cref="FalseExpression"/>。</param>
        /// <param name="arguments">附加参数。</param>
        static public void Do(bool expression,TrueExpression trueExpr,FalseExpression falseExpr,params object[] arguments)
        {
            if (expression) trueExpr(arguments);
            else falseExpr(arguments);
        }
        #endregion
    }
}

#region README

/*
 * ####     ©2014 Wang Yucai
 * 
 * ####     Contact me
 *                  
 *                  E-mail : Masterduner@Yeah.net
 *                  Mobile : 13621384677
 *                  QQ : 180261899
 */

#endregion